#include<climits>
class Solution {
public:
    bool isPalindrome(int x) {
        long long result=0;
        int temp;
        int d=10;
        if(x<0) return false;
        int y=x;
        while(x!=0)
        {
            temp = x % 10;
            result = result*10 + temp;
            x=x/10;
        }
        if(result >= INT_MAX && result <= INT_MIN) return false;
        if(y==result) return true;
        return false;
    }
};
